#include<stdio.h>

int Sumarr(int* arr, int len)
{
    int sum = 0;
    for (int i = 0; i < len; i++) 
    {
        for (int j = 1; j <=len- i ; j += 2) //当前情况下的1,3,5..长度类型的子数组
        {
            for (int m = i; m < i + j; m++)//输出当前的子数组的值
            {
                sum += arr[m];
            }
         }
    }
    return sum;
}

int main()
{
    int arr[]={10,11,12};
    printf("%d\n",Sumarr(arr,sizeof(arr)/sizeof(arr[0])));
    return 0;
}